/** 
 * 
 * Licensed under the MIT License and Apache License version 2.0
 * 
 * Copyright (c) 2011 Jazz Digital (http://www.jazz.etc.br) 
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy of
 * this software and associated documentation files (the "Software"), to deal in
 * the Software without restriction, including without limitation the rights to
 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
 * the Software, and to permit persons to whom the Software is furnished to do so,
 * subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 * 
 * http://www.opensource.org/licenses/mit-license.php
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 * http://code.google.com/p/kinect-jazztures/
 * 
 * @author Valério Oliveira (valck) - http://www.valck.in
 * @author João Marquesini - http://www.markezine.me
 * @author Gabriel Tavares de Souza - http://www.gtsouza.com
 * 
 */
package jazztures.objects{
	
	/**
	 * 
	 * The <code>Skeleton</code> class contains some data and parts of the user body <code>Join</code> to make and manipulate the skeleton.
	 * 
	 */
	public class Skeleton extends Object{
		private var _id : uint;
		
		private var _head : Object;
		private var _neck : Object;
		private var _torso : Object;
		
		private var _leftshoulder : Object;
		private var _rightshoulder : Object;
		
		private var _lefthip : Object;
		private var _righthip : Object;
		
		private var _leftknee : Object;
		private var _rightknee : Object;
		
		private var _leftfoot : Object;
		private var _rightfoot : Object;
		
		private var _leftelbow : Object;
		private var _rightelbow : Object;
		
		private var _lefthand : Object;
		private var _righthand : Object;

		/**
		 * 
		 * The <code>Skeleton</code> class contains some data and parts of the user body <code>Join</code> to make and manipulate the skeleton. 
		 * 
		 * @param p_id The id <code>uint</code> received from the server.
		 * @param p_head The head data <code>Object</code> received from the server.
		 * @param p_neck The neck data <code>Object</code> received from the server.
		 * @param p_torso The torso data <code>Object</code> received from the server.
		 * @param p_leftshoulder The left shoulder data <code>Object</code> received from the server.
		 * @param p_rightshoulder The right shoulder data <code>Object</code> received from the server.
		 * @param p_lefthip The left hip data <code>Object</code> received from the server.
		 * @param p_righthip The right hip data <code>Object</code> received from the server.
		 * @param p_leftknee The left knee data <code>Object</code> received from the server.
		 * @param p_rightknee The right knee data <code>Object</code> received from the server.
		 * @param p_leftfoot The left foot data <code>Object</code> received from the server.
		 * @param p_rightfoot The right foot data <code>Object</code> received from the server.
		 * @param p_leftelbow The left elbow data <code>Object</code> received from the server.
		 * @param p_rightelbow The right elbow data <code>Object</code> received from the server.
		 * @param p_lefthand The left hand data <code>Object</code> received from the server.
		 * @param p_righthand The right hand data <code>Object</code> received from the server.
		 * @see Jazztures
		 * 
		 */
		public function Skeleton(p_id:uint, p_head:Object, p_neck:Object, p_torso:Object, p_leftshoulder:Object, p_rightshoulder:Object, p_lefthip:Object, p_righthip:Object, p_leftknee:Object, p_rightknee:Object, p_leftfoot:Object, p_rightfoot:Object, p_leftelbow:Object, p_rightelbow:Object, p_lefthand:Object, p_righthand:Object){
			_id = p_id;
			
			_head = p_head;
			
			_neck = p_neck;
			_torso = p_torso;
			
			_leftshoulder = p_leftshoulder;
			_rightshoulder = p_rightshoulder;
			
			_lefthip = p_lefthip;
			_righthip = p_righthip;
			
			_leftknee = p_leftknee;
			_rightknee = p_rightknee;
			
			_leftfoot = p_leftfoot;
			_rightfoot = p_rightfoot;
			
			_leftelbow = p_leftelbow;
			_rightelbow = p_rightelbow;
			
			_lefthand = p_lefthand;
			_righthand = p_righthand;
		}
		
		/**
		 * 
		 * Indicates the id of the <code>Skeleton</code>.
		 * 
		 * @return <code>uint</code> 
		 * 
		 */
		public function get id():uint{
			return _id;
		}
		
		/**
		 * 
		 * Indicates the id of the <code>Skeleton</code>.
		 * 
		 * @param p_value The id (<code>uint</code>).
		 * 
		 */
		public function set id(p_value:uint):void{
			_id = p_value;
		}
		
		/**
		 * 
		 * Returns a point with 3D coordinates of head in <code>Join</code> format.
		 * 
		 * @return <code>Join</code>
		 * 
		 */
		public function get head():Join{
			return new Join("head", _head);
		}
		
		/**
		 * 
		 * Returns a point with 3D coordinates of neck in <code>Join</code> format.
		 * 
		 * @return <code>Join</code>
		 * 
		 */
		public function get neck():Join{
			return new Join("neck", _neck);
		}
		
		/**
		 * 
		 * Returns a point with 3D coordinates of torso in <code>Join</code> format.
		 * 
		 * @return <code>Join</code>
		 * 
		 */
		public function get torso():Join{
			return new Join("torso", _torso);
		}
		
		/**
		 * 
		 * Returns a point with 3D coordinates of left shoulder in <code>Join</code> format.
		 * 
		 * @return <code>Join</code>
		 * 
		 */
		public function get leftShoulder():Join{
			return new Join("leftshoulder", _leftshoulder);
		}
		
		/**
		 * 
		 * Returns a point with 3D coordinates of right shoulder in <code>Join</code> format.
		 * 
		 * @return <code>Join</code>
		 * 
		 */
		public function get rightShoulder():Join{
			return new Join("rightshoulder", _rightshoulder);
		}
		
		/**
		 * 
		 * Returns a point with 3D coordinates of left hip in <code>Join</code> format.
		 * 
		 * @return <code>Join</code>
		 * 
		 */
		public function get leftHip():Join{
			return new Join("lefthip", _lefthip);
		}
		
		/**
		 * 
		 * Returns a point with 3D coordinates of right hip in <code>Join</code> format.
		 * 
		 * @return <code>Join</code>
		 * 
		 */
		public function get rightHip():Join{
			return new Join("righthip", _righthip);
		}
		
		/**
		 * 
		 * Returns a point with 3D coordinates of left knee in <code>Join</code> format.
		 * 
		 * @return <code>Join</code>
		 * 
		 */
		public function get leftKnee():Join{
			return new Join("leftknee", _leftknee);
		}
		
		/**
		 * 
		 * Returns a point with 3D coordinates of right knee in <code>Join</code> format.
		 * 
		 * @return <code>Join</code>
		 * 
		 */
		public function get rightKnee():Join{
			return new Join("rightknee", _rightknee);
		}
		
		/**
		 * 
		 * Returns a point with 3D coordinates of left foot in <code>Join</code> format.
		 * 
		 * @return <code>Join</code>
		 * 
		 */
		public function get leftFoot():Join{
			return new Join("leftfoot", _leftfoot);
		}
		
		/**
		 * 
		 * Returns a point with 3D coordinates of right foot in <code>Join</code> format.
		 * 
		 * @return <code>Join</code>
		 * 
		 */
		public function get rightFoot():Join{
			return new Join("rightfoot", _rightfoot);
		}
		
		/**
		 * 
		 * Returns a point with 3D coordinates of left elbow in <code>Join</code> format.
		 * 
		 * @return <code>Join</code>
		 * 
		 */
		public function get leftElbow():Join{
			return new Join("leftelbow", _leftelbow);
		}
		
		/**
		 * 
		 * Returns a point with 3D coordinates of right elbow in <code>Join</code> format.
		 * 
		 * @return <code>Join</code>
		 * 
		 */
		public function get rightElbow():Join{
			return new Join("rightelbow", _rightelbow);
		}
		
		/**
		 * 
		 * Returns a point with 3D coordinates of left hand in <code>Join</code> format.
		 * 
		 * @return <code>Join</code>
		 * 
		 */
		public function get leftHand():Join{
			return new Join("lefthand", _lefthand);
		}
		
		/**
		 * 
		 * Returns a point with 3D coordinates of right hand in <code>Join</code> format.
		 * 
		 * @return <code>Join</code>
		 * 
		 */
		public function get rightHand():Join{
			return new Join("righthand", _righthand);
		}
	}
}
